package com.yfbao.horizon.skywalking.service;

import com.yfbao.horizon.skywalking.service.inter.BaseInterface;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Slf4j
@Component
public class TestParentService implements BaseInterface {

    @Autowired
    private NormalServcie normalServcie;

    @Override
    public List<Long> testPubMethod1(String param){
        log.info("base pub method1");
        String s = normalServcie.testMethod();
        return new ArrayList<>();
    }

    @Override
    public List<Long> testPubMethod2(String param){
        log.info("base pub method2");
        List<Long> list = new ArrayList<>();
        list.add(-1L);
        return list;
    }

    @Override
    public String testPubMethod3(String param){
        log.info("base pub method3");
        String s = normalServcie.testMethod();
        return s+"_"+param;
    }

    @Override
    public String testPubMethod3(String param, Integer num){
        log.info("base pub method3 param2");
        String s = normalServcie.testMethod();
        return  s+"_"+param+"_"+num;
    }

    private String testPriMethod(String tt){
        log.info("base private method");
        return tt;
    }
}
